﻿using System.Configuration;

namespace TogNet.Configuration
{
    public class NetworkAdapter : ConfigurationElement
    {
        [ConfigurationProperty("Name", DefaultValue = "", IsRequired = true)]
        public string Name
        {
            get { return (string) this["Name"]; }
            set { this["Name"] = value; }
        }

        [ConfigurationProperty("ShouldEnableProxy", DefaultValue = "false", IsRequired = true)]
        public bool ShouldEnableProxy
        {
            get { return (bool) this["ShouldEnableProxy"]; }
            set { this["ShouldEnableProxy"] = value; }
        }

        [ConfigurationProperty("IsAlreadyEnabled", DefaultValue = "false", IsRequired = false)]
        public bool IsAlreadyEnabled
        {
            get { return (bool) this["IsAlreadyEnabled"]; }
            set { this["IsAlreadyEnabled"] = value; }
        }

        public override bool IsReadOnly()
        {
            return false;
        }
    }
}
